<!DOCTYPE html>
<html  lang="zh">
<head>
    <meta charset="utf-8" />

<meta name="generator" content="Hexo 4.0.0" />

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />

<title>opencv 在python中的使用 - Herb2sy</title>


    <meta name="description" content="基础属性  img.shape # (长,宽,通道数) img.size # 大小 img.dtype # 数据类型">
<meta name="keywords" content="opencv,python">
<meta property="og:type" content="article">
<meta property="og:title" content="opencv 在python中的使用">
<meta property="og:url" content="https:&#x2F;&#x2F;herb2sy.gitee.io&#x2F;herbnote&#x2F;2019&#x2F;11&#x2F;30&#x2F;python&#x2F;machine_vision&#x2F;opencv%E7%9A%84%E4%BD%BF%E7%94%A8&#x2F;index.html">
<meta property="og:site_name" content="Herb2sy">
<meta property="og:description" content="基础属性  img.shape # (长,宽,通道数) img.size # 大小 img.dtype # 数据类型">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="https:&#x2F;&#x2F;herb2sy.gitee.io&#x2F;herbnote&#x2F;herbnote&#x2F;img&#x2F;icon_opencv.png">
<meta property="og:updated_time" content="2019-12-01T06:26:14.281Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https:&#x2F;&#x2F;herb2sy.gitee.io&#x2F;herbnote&#x2F;herbnote&#x2F;img&#x2F;icon_opencv.png">







<link rel="icon" href="/herbnote/images/icon.jpg">


<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.7.2/css/bulma.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,600|Source+Code+Pro">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@9.12.0/styles/atom-one-light.css">


    
    
<style>body>.footer,body>.navbar,body>.section{opacity:0}</style>

    
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lightgallery@1.6.8/dist/css/lightgallery.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/css/justifiedGallery.min.css">

    
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.css">

    
    
    
    
<link rel="stylesheet" href="/herbnote/css/back-to-top.css">

    
    
    
    
    
    
    
    <link rel="stylesheet" href="/herbnote/css/progressbar.css">
<script src="https://cdn.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js"></script>
    
    
    


<link rel="stylesheet" href="/herbnote/css/style.css">
</head>
<body class="is-3-column">
    <nav class="navbar navbar-main">
    <div class="container">
        <div class="navbar-brand is-flex-center">
            <a class="navbar-item navbar-logo" href="/herbnote/">
            
                <img src="/herbnote/images/icon.jpg" alt="opencv 在python中的使用" height="28">
            
            </a>
        </div>
        <div class="navbar-menu">
            
            <div class="navbar-start">
                
                <a class="navbar-item"
                href="/herbnote/">主页</a>
                
                <a class="navbar-item"
                href="/herbnote/archives">档案</a>
                
                <a class="navbar-item"
                href="/herbnote/categories">分类</a>
                
                <a class="navbar-item"
                href="/herbnote/tags">标签</a>
                
                <a class="navbar-item"
                href="/herbnote/about">关于</a>
                
            </div>
            
            <div class="navbar-end">
                
                    
                    <a class="navbar-item" target="_blank" title="Download on GitHub" href="https://github.com/HerbLee">
                        
                        <i class="fab fa-github"></i>
                        
                    </a>
                    
                
                
                <a class="navbar-item is-hidden-tablet catalogue" title="目录" href="javascript:;" target="_blank" rel="noopener">
                    <i class="fas fa-list-ul"></i>
                </a>
                
                
                <a class="navbar-item search" title="搜索" href="javascript:;" target="_blank" rel="noopener">
                    <i class="fas fa-search"></i>
                </a>
                
            </div>
        </div>
    </div>
</nav>
    
    <section class="section">
        <div class="container">
            <div class="columns">
                <div class="column is-8-tablet is-8-desktop is-6-widescreen has-order-2 column-main">
<div class="card">
    
    <div class="card-image">
        <span  class="image is-7by1">
            <img class="thumbnail" src="/herbnote/img/icon_opencv.png" alt="opencv 在python中的使用">
        </span>
    </div>
    
    <div class="card-content article ">
        
        <div class="level article-meta is-size-7 is-uppercase is-mobile is-overflow-x-auto">
            <div class="level-left">
                <time class="level-item has-text-grey" datetime="2019-11-29T17:48:00.000Z">2019-11-30</time>
                
                <div class="level-item">
                <a class="has-link-grey -link" href="/herbnote/categories/python/">python</a>&nbsp;/&nbsp;<a class="has-link-grey -link" href="/herbnote/categories/python/%E6%9C%BA%E5%99%A8%E8%A7%86%E8%A7%89/">机器视觉</a>
                </div>
                
                
                <span class="level-item has-text-grey">
                    
                    
                    4 分钟 读完 (大约 567 个字)
                </span>
                
                
            </div>
        </div>
        
        <h1 class="title is-size-3 is-size-4-mobile has-text-weight-normal">
            
                opencv 在python中的使用
            
        </h1>
        <div class="content">
            <p><img src="/img/python_badgers.svg" alt> <img src="/img/opencv_badgers.svg" alt></p>
<blockquote>
<p>基础属性</p>
</blockquote>
<pre><code>img.shape # (长,宽,通道数)
img.size # 大小
img.dtype # 数据类型</code></pre><a id="more"></a>

<h2 id="基储操作"><a href="#基储操作" class="headerlink" title="基储操作"></a>基储操作</h2><h3 id="读取保存展示"><a href="#读取保存展示" class="headerlink" title="读取保存展示"></a>读取保存展示</h3><h4 id="图片读取"><a href="#图片读取" class="headerlink" title="图片读取"></a>图片读取</h4><pre><code>cv2.imread(filename) # 读取图片
cv2.imread(filename,flags) # flags False为灰度图像 True 为彩图
cv.imread(filename, cv.IMREAD_GRAYSCALE) # 读取单通道图</code></pre><h4 id="图片保存"><a href="#图片保存" class="headerlink" title="图片保存"></a>图片保存</h4><pre><code>cv2.imwrite(filename,img)
# 指定jpg图片质量 0-100 默认95  越高画质越好，文件越大
cv2.imwrite(&apos;*.jpg&apos;, img, (cv.IMWRITE_JPEG_QUALITY, 80))
# 指定png图片质量 0-9 默认3 越高文件越小，画质越差</code></pre><h4 id="图片展示"><a href="#图片展示" class="headerlink" title="图片展示"></a>图片展示</h4><pre><code>cv2.imshow(winname, mat) # winname 为框上名称, mat 为要展示的图片
cv2.waitKey(0) # 键盘绑定函数</code></pre><h4 id="复制图片"><a href="#复制图片" class="headerlink" title="复制图片"></a>复制图片</h4><pre><code>img2 = img.copy()</code></pre><h4 id="释放窗口"><a href="#释放窗口" class="headerlink" title="释放窗口"></a>释放窗口</h4><pre><code>cv2.destroyWindow(winname) # winname 释放窗口名称
cv2.destroyAllWindows() # 释放所有窗口</code></pre><h3 id="几何变换"><a href="#几何变换" class="headerlink" title="几何变换"></a>几何变换</h3><h4 id="裁剪"><a href="#裁剪" class="headerlink" title="裁剪"></a>裁剪</h4><pre><code>img[y0:y1, x0:x1]</code></pre><h4 id="缩放"><a href="#缩放" class="headerlink" title="缩放"></a>缩放</h4><pre><code>#  dsize (0,0) 元祖,输出的长和宽
# fx x方向缩放倍数
# fy y方向缩放倍数
# interpolation 插值方法 默认是 cv2.INTER_LINEAR
cv2.resize(src, dsize, dst=None, fx=None, fy=None, interpolation=None)</code></pre><h4 id="补边"><a href="#补边" class="headerlink" title="补边"></a>补边</h4><pre><code># top,bottom,left,right 为上下左右添加大小
# value (r,g,b) 为填充颜色
cv2.copyMakeBorder(img, top, bottom, left, right,cv2.BORDER_CONSTANT,value=(0, 0, 0))</code></pre><h4 id="旋转"><a href="#旋转" class="headerlink" title="旋转"></a>旋转</h4><pre><code>A3 = cv2.getRotationMatrix2D((w/2,h/2),30,1)
res_img = cv2.warpAffine(img, A3, (w, h), borderValue=125)</code></pre><h4 id="翻转"><a href="#翻转" class="headerlink" title="翻转"></a>翻转</h4><pre><code>cv2.flip(dst,-1)#原点翻转
cv2.flip(dst,0)#上下翻转
cv2.flip(dst,1)#左右翻转</code></pre><h3 id="图像处理"><a href="#图像处理" class="headerlink" title="图像处理"></a>图像处理</h3><h4 id="通道分离合并"><a href="#通道分离合并" class="headerlink" title="通道分离合并"></a>通道分离合并</h4><pre><code># 分离通道图
b,g,r = cv2.split(img)

# 合并通道图
merge = cv2.merge([b,g,r])</code></pre><h4 id="色彩空间转换"><a href="#色彩空间转换" class="headerlink" title="色彩空间转换"></a>色彩空间转换</h4><pre><code># 通过cv2.cvtColor把图像从BGR转换到HSV
img_hsv = cv.cvtColor(img, cv.COLOR_BGR2HSV)</code></pre><h3 id="亮度色调"><a href="#亮度色调" class="headerlink" title="亮度色调"></a>亮度色调</h3><pre><code># 增加色调
turn_green_hsv[:, :, 0] = (turn_green_hsv[:, :, 0]+15) % 180
# 减小饱和度
colorless_hsv[:, :, 1] = 0.5 * colorless_hsv[:, :, 1]
# 减小明度
darker_hsv[:, :, 2] = 0.5 * darker_hsv[:, :, 2]</code></pre><h3 id="仿射变换"><a href="#仿射变换" class="headerlink" title="仿射变换"></a>仿射变换</h3><blockquote>
<p>主要包括缩放、旋转、剪切、翻转、平移</p>
</blockquote>
<p>待整理</p>
<h2 id="绘图"><a href="#绘图" class="headerlink" title="绘图"></a>绘图</h2><h3 id="基本绘图"><a href="#基本绘图" class="headerlink" title="基本绘图"></a>基本绘图</h3><blockquote>
<p>可以在画面上绘制线段，圆，矩形和多边形等，还可以在图像上指定位置打印文字</p>
</blockquote>
<h4 id="画线"><a href="#画线" class="headerlink" title="画线"></a>画线</h4><pre><code>cv2.line(canvas, (x0, y0), (x1, y1), (r, g, b), thickness)</code></pre><h4 id="画圆"><a href="#画圆" class="headerlink" title="画圆"></a>画圆</h4><pre><code>cv2.circle(canvas, (Ox, Oy), r, (r, g, b), thickness)</code></pre><h4 id="矩形"><a href="#矩形" class="headerlink" title="矩形"></a>矩形</h4><pre><code>cv2.rectangle(canvas, (x0, y0), (x1, y1), (r, g, b), thickness)</code></pre><h4 id="文字"><a href="#文字" class="headerlink" title="文字"></a>文字</h4><pre><code># org 起始坐标
# fontFace 字体
# fontScale 字体比例
# color 字体颜色
# thickness 线宽
cv2.putText(img, text, org, fontFace, fontScale, color, thickness=None)</code></pre><h2 id="视频处理"><a href="#视频处理" class="headerlink" title="视频处理"></a>视频处理</h2><p>功能待补充</p>

        </div>
        
        <div class="level is-size-7 is-uppercase">
            <div class="level-start">
                <div class="level-item">
                    <span class="is-size-6 has-text-grey has-mr-7">#</span>
                    <a class="has-link-grey -link" href="/herbnote/tags/opencv/" rel="tag">opencv</a>, <a class="has-link-grey -link" href="/herbnote/tags/python/" rel="tag">python</a>
                </div>
            </div>
        </div>
        
        
        
    </div>
</div>






</div>
                




<div class="column is-4-tablet is-4-desktop is-3-widescreen  has-order-1 column-left ">
    
        
<div class="card widget">
    <div class="card-content">
        <nav class="level">
            <div class="level-item has-text-centered" style="flex-shrink: 1">
                <div>
                    
                    <figure class="image is-128x128 has-mb-6">
                        <img class="" src="/herbnote/images/avatar.png" alt="HerbLee">
                    </figure>
                    
                    <p class="is-size-4 is-block">
                        HerbLee
                    </p>
                    
                    
                    <p class="is-size-6 is-block">
                        herb2sy@gmail.com
                    </p>
                    
                    
                    <p class="is-size-6 is-flex is-flex-center has-text-grey">
                        <i class="fas fa-map-marker-alt has-mr-7"></i>
                        <span>上海·浦东</span>
                    </p>
                    
                </div>
            </div>
        </nav>
        <nav class="level is-mobile">
            <div class="level-item has-text-centered is-marginless">
                <div>
                    <p class="heading">
                        文章
                    </p>
                    <a href="/herbnote/archives">
                        <p class="title has-text-weight-normal">
                            1
                        </p>
                    </a>
                </div>
            </div>
            <div class="level-item has-text-centered is-marginless">
                <div>
                    <p class="heading">
                        分类
                    </p>
                    <a href="/herbnote/categories">
                        <p class="title has-text-weight-normal">
                            2
                        </p>
                    </a>
                </div>
            </div>
            <div class="level-item has-text-centered is-marginless">
                <div>
                    <p class="heading">
                        标签
                    </p>
                    <a href="/herbnote/tags">
                        <p class="title has-text-weight-normal">
                            2
                        </p>
                    </a>
                </div>
            </div>
        </nav>
        
        <div class="level">
            <a class="level-item button is-link is-rounded" href="https://github.com/HerbLee" target="_blank">
                关注我</a>
        </div>
        
        
        
        <div class="level is-mobile">
            
            <a class="level-item button is-white is-marginless" target="_blank"
                title="Github" href="https://github.com/HerbLee">
                
                <i class="fab fa-github"></i>
                
            </a>
            
        </div>
        
    </div>
</div>
    
        

    <div class="card widget" id="toc">
        <div class="card-content">
            <div class="menu">
                <h3 class="menu-label">
                    目录
                </h3>
                <ul class="menu-list"><li>
        <a class="is-flex" href="#基储操作">
        <span class="has-mr-6">1</span>
        <span>基储操作</span>
        </a><ul class="menu-list"><li>
        <a class="is-flex" href="#读取保存展示">
        <span class="has-mr-6">1.1</span>
        <span>读取保存展示</span>
        </a><ul class="menu-list"><li>
        <a class="is-flex" href="#图片读取">
        <span class="has-mr-6">1.1.1</span>
        <span>图片读取</span>
        </a></li><li>
        <a class="is-flex" href="#图片保存">
        <span class="has-mr-6">1.1.2</span>
        <span>图片保存</span>
        </a></li><li>
        <a class="is-flex" href="#图片展示">
        <span class="has-mr-6">1.1.3</span>
        <span>图片展示</span>
        </a></li><li>
        <a class="is-flex" href="#复制图片">
        <span class="has-mr-6">1.1.4</span>
        <span>复制图片</span>
        </a></li><li>
        <a class="is-flex" href="#释放窗口">
        <span class="has-mr-6">1.1.5</span>
        <span>释放窗口</span>
        </a></li></ul></li><li>
        <a class="is-flex" href="#几何变换">
        <span class="has-mr-6">1.2</span>
        <span>几何变换</span>
        </a><ul class="menu-list"><li>
        <a class="is-flex" href="#裁剪">
        <span class="has-mr-6">1.2.1</span>
        <span>裁剪</span>
        </a></li><li>
        <a class="is-flex" href="#缩放">
        <span class="has-mr-6">1.2.2</span>
        <span>缩放</span>
        </a></li><li>
        <a class="is-flex" href="#补边">
        <span class="has-mr-6">1.2.3</span>
        <span>补边</span>
        </a></li><li>
        <a class="is-flex" href="#旋转">
        <span class="has-mr-6">1.2.4</span>
        <span>旋转</span>
        </a></li><li>
        <a class="is-flex" href="#翻转">
        <span class="has-mr-6">1.2.5</span>
        <span>翻转</span>
        </a></li></ul></li><li>
        <a class="is-flex" href="#图像处理">
        <span class="has-mr-6">1.3</span>
        <span>图像处理</span>
        </a><ul class="menu-list"><li>
        <a class="is-flex" href="#通道分离合并">
        <span class="has-mr-6">1.3.1</span>
        <span>通道分离合并</span>
        </a></li><li>
        <a class="is-flex" href="#色彩空间转换">
        <span class="has-mr-6">1.3.2</span>
        <span>色彩空间转换</span>
        </a></li></ul></li><li>
        <a class="is-flex" href="#亮度色调">
        <span class="has-mr-6">1.4</span>
        <span>亮度色调</span>
        </a></li><li>
        <a class="is-flex" href="#仿射变换">
        <span class="has-mr-6">1.5</span>
        <span>仿射变换</span>
        </a></li></ul></li><li>
        <a class="is-flex" href="#绘图">
        <span class="has-mr-6">2</span>
        <span>绘图</span>
        </a><ul class="menu-list"><li>
        <a class="is-flex" href="#基本绘图">
        <span class="has-mr-6">2.1</span>
        <span>基本绘图</span>
        </a><ul class="menu-list"><li>
        <a class="is-flex" href="#画线">
        <span class="has-mr-6">2.1.1</span>
        <span>画线</span>
        </a></li><li>
        <a class="is-flex" href="#画圆">
        <span class="has-mr-6">2.1.2</span>
        <span>画圆</span>
        </a></li><li>
        <a class="is-flex" href="#矩形">
        <span class="has-mr-6">2.1.3</span>
        <span>矩形</span>
        </a></li><li>
        <a class="is-flex" href="#文字">
        <span class="has-mr-6">2.1.4</span>
        <span>文字</span>
        </a></li></ul></li></ul></li><li>
        <a class="is-flex" href="#视频处理">
        <span class="has-mr-6">3</span>
        <span>视频处理</span>
        </a></li></ul>
            </div>
        </div>
    </div>

    
        <div class="card widget">
    <div class="card-content">
        <div class="menu">
        <h3 class="menu-label">
            链接
        </h3>
        <ul class="menu-list">
        
            <li>
                <a class="level is-mobile" href="http://herb2sy.club" target="_blank">
                    <span class="level-left">
                        <span class="level-item">Herb</span>
                    </span>
                    <span class="level-right">
                        <span class="level-item tag">herb2sy.club</span>
                    </span>
                </a>
            </li>
        
        </ul>
        </div>
    </div>
</div>

    
        
<div class="card widget">
    <div class="card-content">
        <div class="menu">
            <h3 class="menu-label">
                分类
            </h3>
            <ul class="menu-list">
            <li>
        <a class="level is-marginless" href="/herbnote/categories/python/">
            <span class="level-start">
                <span class="level-item">python</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a><ul><li>
        <a class="level is-marginless" href="/herbnote/categories/python/%E6%9C%BA%E5%99%A8%E8%A7%86%E8%A7%89/">
            <span class="level-start">
                <span class="level-item">机器视觉</span>
            </span>
            <span class="level-end">
                <span class="level-item tag">1</span>
            </span>
        </a></li></ul></li>
            </ul>
        </div>
    </div>
</div>
    
        <div class="card widget">
    <div class="card-content">
        <h3 class="menu-label">
            标签云
        </h3>
        <a href="/herbnote/tags/opencv/" style="font-size: 10px;">opencv</a> <a href="/herbnote/tags/python/" style="font-size: 10px;">python</a>
    </div>
</div>
    
    
        <div class="column-right-shadow is-hidden-widescreen ">
        
            <div class="card widget">
    <div class="card-content">
        <h3 class="menu-label">
            最新文章
        </h3>
        
        <article class="media">
            
            <a href="/herbnote/2019/11/30/python/machine_vision/opencv%E7%9A%84%E4%BD%BF%E7%94%A8/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/herbnote/img/icon_opencv.png" alt="opencv 在python中的使用">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2019-11-29T17:48:00.000Z">2019-11-30</time></div>
                    <a href="/herbnote/2019/11/30/python/machine_vision/opencv%E7%9A%84%E4%BD%BF%E7%94%A8/" class="title has-link-black-ter is-size-6 has-text-weight-normal">opencv 在python中的使用</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/herbnote/categories/python/">python</a> / <a class="has-link-grey -link" href="/herbnote/categories/python/%E6%9C%BA%E5%99%A8%E8%A7%86%E8%A7%89/">机器视觉</a>
                    </p>
                </div>
            </div>
        </article>
        
    </div>
</div>
        
            <div class="card widget">
    <div class="card-content">
        <div class="menu">
        <h3 class="menu-label">
            归档
        </h3>
        <ul class="menu-list">
        
        <li>
            <a class="level is-marginless" href="/herbnote/archives/2019/11/">
                <span class="level-start">
                    <span class="level-item">十一月 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        </ul>
        </div>
    </div>
</div>
        
            <div class="card widget">
    <div class="card-content">
        <div class="menu">
            <h3 class="menu-label">
                标签
            </h3>
            <div class="field is-grouped is-grouped-multiline">
                
                <div class="control">
                    <a class="tags has-addons" href="/herbnote/tags/opencv/">
                        <span class="tag">opencv</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/herbnote/tags/python/">
                        <span class="tag">python</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
            </div>
        </div>
    </div>
</div>
        
        </div>
    
</div>

                




<div class="column is-4-tablet is-4-desktop is-3-widescreen is-hidden-touch is-hidden-desktop-only has-order-3 column-right ">
    
        <div class="card widget">
    <div class="card-content">
        <h3 class="menu-label">
            最新文章
        </h3>
        
        <article class="media">
            
            <a href="/herbnote/2019/11/30/python/machine_vision/opencv%E7%9A%84%E4%BD%BF%E7%94%A8/" class="media-left">
                <p class="image is-64x64">
                    <img class="thumbnail" src="/herbnote/img/icon_opencv.png" alt="opencv 在python中的使用">
                </p>
            </a>
            
            <div class="media-content">
                <div class="content">
                    <div><time class="has-text-grey is-size-7 is-uppercase" datetime="2019-11-29T17:48:00.000Z">2019-11-30</time></div>
                    <a href="/herbnote/2019/11/30/python/machine_vision/opencv%E7%9A%84%E4%BD%BF%E7%94%A8/" class="title has-link-black-ter is-size-6 has-text-weight-normal">opencv 在python中的使用</a>
                    <p class="is-size-7 is-uppercase">
                        <a class="has-link-grey -link" href="/herbnote/categories/python/">python</a> / <a class="has-link-grey -link" href="/herbnote/categories/python/%E6%9C%BA%E5%99%A8%E8%A7%86%E8%A7%89/">机器视觉</a>
                    </p>
                </div>
            </div>
        </article>
        
    </div>
</div>
    
        <div class="card widget">
    <div class="card-content">
        <div class="menu">
        <h3 class="menu-label">
            归档
        </h3>
        <ul class="menu-list">
        
        <li>
            <a class="level is-marginless" href="/herbnote/archives/2019/11/">
                <span class="level-start">
                    <span class="level-item">十一月 2019</span>
                </span>
                <span class="level-end">
                    <span class="level-item tag">1</span>
                </span>
            </a>
        </li>
        
        </ul>
        </div>
    </div>
</div>
    
        <div class="card widget">
    <div class="card-content">
        <div class="menu">
            <h3 class="menu-label">
                标签
            </h3>
            <div class="field is-grouped is-grouped-multiline">
                
                <div class="control">
                    <a class="tags has-addons" href="/herbnote/tags/opencv/">
                        <span class="tag">opencv</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
                <div class="control">
                    <a class="tags has-addons" href="/herbnote/tags/python/">
                        <span class="tag">python</span>
                        <span class="tag is-grey">1</span>
                    </a>
                </div>
                
            </div>
        </div>
    </div>
</div>
    
    
</div>

            </div>
        </div>
    </section>
    <footer class="footer">
    <div class="container">
        <div class="level">
            <div class="level-start has-text-centered-mobile">
                <a class="footer-logo is-block has-mb-6" href="/herbnote/">
                
                    <img src="/herbnote/images/icon.jpg" alt="opencv 在python中的使用" height="28">
                
                </a>
                <p class="is-size-7">
                &copy; 2018-2019 HerbLee&nbsp;
                <a href = "http://www.beian.miit.gov.cn" target="_blank" style="color:#333333">冀ICP备18000513号-2</a>
                
                
                </p>
            </div>
            <div class="level-end">
            
                <div class="field has-addons is-flex-center-mobile has-mt-5-mobile is-flex-wrap is-flex-middle">
                
                <p class="control">
                    <a class="button is-white is-large" target="_blank" title="Creative Commons" href="https://creativecommons.org/">
                        
                        <i class="fab fa-creative-commons"></i>
                        
                    </a>
                </p>
                
                <p class="control">
                    <a class="button is-white is-large" target="_blank" title="Attribution 4.0 International" href="https://creativecommons.org/licenses/by/4.0/">
                        
                        <i class="fab fa-creative-commons-by"></i>
                        
                    </a>
                </p>
                
                <p class="control">
                    <a class="button is-white is-large" target="_blank" title="Download on GitHub" href="https://github.com/HerbLee">
                        
                        <i class="fab fa-github"></i>
                        
                    </a>
                </p>
                
                </div>
            
            </div>
        </div>
    </div>
   
</footer>

    <script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/moment@2.22.2/min/moment-with-locales.min.js"></script>
<script>moment.locale("zh-CN");</script>

<script>
var IcarusThemeSettings = {
    article: {
        highlight: {
            clipboard: true,
            fold: 'unfolded'
        }
    }
};
</script>


    <script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.4/dist/clipboard.min.js" defer></script>



    
    
<script src="/herbnote/js/animation.js"></script>

    
    
<script src="https://cdn.jsdelivr.net/npm/lightgallery@1.6.8/dist/js/lightgallery.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js" defer></script>
<script src="/herbnote/js/gallery.js" defer></script>

    
    
<div id="outdated">
    <h6>Your browser is out-of-date!</h6>
    <p>Update your browser to view this website correctly. <a id="btnUpdateBrowser" href="http://outdatedbrowser.com/" target="_blank" rel="noopener">Update
            my browser now </a></p>
    <p class="last"><a href="#" id="btnCloseUpdateBrowser" title="Close">&times;</a></p>
</div>
<script src="https://cdn.jsdelivr.net/npm/outdatedbrowser@1.1.5/outdatedbrowser/outdatedbrowser.min.js" defer></script>
<script>
    document.addEventListener("DOMContentLoaded", function () {
        outdatedBrowser({
            bgColor: '#f25648',
            color: '#ffffff',
            lowerThan: 'flex'
        });
    });
</script>

    
    <script src="https://cdn.jsdelivr.net/npm/mathjax@2.7.5/unpacked/MathJax.js?config=TeX-MML-AM_CHTML" defer></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
    MathJax.Hub.Config({
        'HTML-CSS': {
            matchFontHeight: false
        },
        SVG: {
            matchFontHeight: false
        },
        CommonHTML: {
            matchFontHeight: false
        },
        tex2jax: {
            inlineMath: [
                ['$','$'],
                ['\\(','\\)']
            ]
        }
    });
});
</script>
    
    
<a id="back-to-top" title="回到顶端" href="javascript:;" target="_blank" rel="noopener">
    <i class="fas fa-chevron-up"></i>
</a>
<script src="/herbnote/js/back-to-top.js" defer></script>

    
    
    
    
    
    
    
    
    
    
    


<script src="/herbnote/js/main.js" defer></script>

    
    <div class="searchbox ins-search">
    <div class="searchbox-container ins-search-container">
        <div class="searchbox-input-wrapper">
            <input type="text" class="searchbox-input ins-search-input" placeholder="想要查找什么..." />
            <span class="searchbox-close ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="searchbox-result-wrapper ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
    (function (window) {
        var INSIGHT_CONFIG = {
            TRANSLATION: {
                POSTS: '文章',
                PAGES: '页面',
                CATEGORIES: '分类',
                TAGS: '标签',
                UNTITLED: '(无标题)',
            },
            CONTENT_URL: '/herbnote/content.json',
        };
        window.INSIGHT_CONFIG = INSIGHT_CONFIG;
    })(window);
</script>
<script src="/herbnote/js/insight.js" defer></script>
<link rel="stylesheet" href="/herbnote/css/search.css">
<link rel="stylesheet" href="/herbnote/css/insight.css">
    
</body>
</html>